home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-01 | 4.2 KB | 227 lines | [TEXT/MPS ] |
- /*------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # MultiFinder-Aware Simple Sample Application
- #
- # CrashOMatic
- #
- # CrashOMatic.r - Rez Source
- #
- # Copyright © 1989-93 Apple Computer, Inc.
- ------------------------------------------------------------------------------*/
-
-
- #include "Types.r"
- #include "CodeFragmentTypes.r"
-
- #include "CrashOMatic.h"
-
-
-
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mEdit, mTest }; /* four menus */
- };
-
-
- resource 'MENU' (mApple, preload) {
- mApple, textMenuProc,
- AllItems & ~MenuItem2, /* Disable dashed line, enable About and DAs */
- enabled, apple,
- {
- "About Crash-O-Matic…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) {
- mFile, textMenuProc,
- AllItems, /* All items */
- enabled, "File",
- {
- "Quit",
- noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) {
- mEdit, textMenuProc,
- NoItems, /* disable everything, program does the enabling */
- enabled, "Edit",
- {
- "Undo",
- noicon, "Z", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Cut",
- noicon, "X", nomark, plain;
- "Copy",
- noicon, "C", nomark, plain;
- "Paste",
- noicon, "V", nomark, plain;
- "Clear",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mTest, preload) {
- mTest, textMenuProc,
- AllItems & ~MenuItem2 & ~MenuItem6, /* figure it out for yourself */
- enabled, "Debug",
- {
- "Go to Debugger",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Clobber Location 0",
- noicon, nokey, nomark, plain;
- "Bus Error",
- noicon, nokey, nomark, plain;
- "Illegal Instruction",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Exception Handlers Installed",
- noicon, nokey, nomark, plain
- }
- };
-
-
- /* this ALRT and DITL are used as an About screen */
-
- resource 'ALRT' (rAboutAlert, purgeable) {
- {40, 20, 160, 290},
- rAboutAlert,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- };
-
- resource 'DITL' (rAboutAlert, purgeable) {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {88, 180, 108, 260},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {8, 8, 24, 214},
- StaticText {
- disabled,
- "Simple Sample (Crash-O-Matic)"
- },
- /* [3] */
- {32, 8, 48, 237},
- StaticText {
- disabled,
- "Copyright © 1993 Apple Computer"
- },
- /* [4] */
- {56, 8, 72, 136},
- StaticText {
- disabled,
- "Brought to you by:"
- },
- /* [5] */
- {80, 24, 112, 167},
- StaticText {
- disabled,
- "Brian Topping & \nDave Falkenburg"
- }
- }
- };
-
-
- /* this ALRT and DITL are used as an error screen */
-
- resource 'ALRT' (rUserAlert, purgeable) {
- {40, 20, 120, 260},
- rUserAlert,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- };
-
-
- resource 'DITL' (rUserAlert, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {50, 150, 70, 230},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {10, 60, 30, 230},
- StaticText {
- disabled,
- "^0"
- },
- /* [3] */
- {8, 8, 40, 40},
- Icon {
- disabled,
- 2
- }
- }
- };
-
-
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground, /* we can background; we don't currently, but our sleep value */
- /* guarantees we don't hog the Mac while we are in the background */
- multiFinderAware, /* this says we do our own activate/deactivate; don't fake us out */
- backgroundAndForeground, /* this is definitely not a background-only application! */
- dontGetFrontClicks, /* change this is if you want "do first click" behavior like the Finder */
- ignoreChildDiedEvents, /* essentially, I'm not a debugger (sub-launching) */
- not32BitCompatible, /* this app should not be run in 32-bit address space */
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-
- resource 'cfrg' (0) {
- { /* array memberArray: 1 elements */
- /* [1] */
- kPowerPC,
- kFullLib,
- kNoVersionNum,
- kNoVersionNum,
- 65536,
- appSubFolderID,
- kIsApp,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- "CrashOMatic"
- }
- };
-
-